package com.s7_widget.adapter;

import android.widget.ImageView;
import android.widget.TextView;

import com.s7.recycler.adapter.BaseLoadingAdapter;
import com.s7.recycler.holder.BaseViewHolder;
import com.s7_widget.MyApp;
import com.s7_widget.R;

public class LoadAdapter extends BaseLoadingAdapter<String> {
    @Override
    protected int getLayoutId() {
        return R.layout.staggered_item;
    }

    @Override
    protected void bindData(BaseViewHolder holder, int position, String data) {
        TextView textView = holder.getView(R.id.staggered_text);
        MyApp.getInstance().setImage("http://img2.3lian.com/2014/f2/37/d/39.jpg", (ImageView) holder.getView(R.id.staggered_image));
        textView.setText(data);
    }
}
